package priv.yiyuan.example.design.payment;

import java.math.BigDecimal;

/**
 * H5 支付
 *
 * @author YiYuan
 * @data 2025/8/14
 * @apoNote
 */
public class H5Payment extends PaymentMethod {

    public H5Payment(PaymentPlatform paymentPlatform) {
        super(paymentPlatform);
    }

    @Override
    public void pay(BigDecimal amount) {
        System.out.println("使用" + paymentPlatform.getPlatformName() + "的H5支付");
        System.out.println("跳转支付页面...");
        paymentPlatform.processPayment(amount);
    }

    @Override
    public String getMethodName() {
        return "H5支付";
    }
}
